Optimal. Leaf size=61 \[ \frac{(3 a+4 b) \sin (e+f x) \cos (e+f x)}{8 f}+\frac{1}{8} x (3 a+4 b)+\frac{a \sin (e+f x) \cos ^3(e+f x)}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.041084, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4045, 2635, 8} \[ \frac{(3 a+4 b) \sin (e+f x) \cos (e+f x)}{8 f}+\frac{1}{8} x (3 a+4 b)+\frac{a \sin (e+f x) \cos ^3(e+f x)}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4045
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=\frac{a \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac{1}{4} (3 a+4 b) \int \cos ^2(e+f x) \, dx\\ &=\frac{(3 a+4 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac{a \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac{1}{8} (3 a+4 b) \int 1 \, dx\\ &=\frac{1}{8} (3 a+4 b) x+\frac{(3 a+4 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac{a \cos ^3(e+f x) \sin (e+f x)}{4 f}\\ \end{align*}
Mathematica [A] time = 0.0884978, size = 45, normalized size = 0.74 \[ \frac{4 (3 a+4 b) (e+f x)+8 (a+b) \sin (2 (e+f x))+a \sin (4 (e+f x))}{32 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.058, size = 65, normalized size = 1.1 \begin{align*}{\frac{1}{f} \left ( a \left ({\frac{\sin \left ( fx+e \right ) }{4} \left ( \left ( \cos \left ( fx+e \right ) \right ) ^{3}+{\frac{3\,\cos \left ( fx+e \right ) }{2}} \right ) }+{\frac{3\,fx}{8}}+{\frac{3\,e}{8}} \right ) +b \left ({\frac{\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }{2}}+{\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.48162, size = 99, normalized size = 1.62 \begin{align*} \frac{{\left (f x + e\right )}{\left (3 \, a + 4 \, b\right )} + \frac{{\left (3 \, a + 4 \, b\right )} \tan \left (f x + e\right )^{3} +{\left (5 \, a + 4 \, b\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{4} + 2 \, \tan \left (f x + e\right )^{2} + 1}}{8 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.483855, size = 119, normalized size = 1.95 \begin{align*} \frac{{\left (3 \, a + 4 \, b\right )} f x +{\left (2 \, a \cos \left (f x + e\right )^{3} +{\left (3 \, a + 4 \, b\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.34478, size = 107, normalized size = 1.75 \begin{align*} \frac{{\left (f x + e\right )}{\left (3 \, a + 4 \, b\right )} + \frac{3 \, a \tan \left (f x + e\right )^{3} + 4 \, b \tan \left (f x + e\right )^{3} + 5 \, a \tan \left (f x + e\right ) + 4 \, b \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{2}}}{8 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]